package com.ruoyi.game.core;

import lombok.Data;
import org.springframework.web.socket.WebSocketSession;

import java.util.HashSet;
import java.util.Set;

/**
 * 房间座位 DTO（5 个固定座位）
 * - 座位占用/空闲
 * - 玩家身份 & Socket
 * - 房间全局分数
 */
@Data
public class GameRoomPos {

    private final int seatIndex;              // 0‑4
    private final Set<PKOpType> receiveOpTypes = new HashSet<>();
    private boolean operated = false;
    private long        playerId;              // 0 表示空
    private boolean     ready;
    private boolean     trusteeship;
    private String name;
    private String headImageUrl;
    private int sex;
    private int score;                      // 本次房间累计结算分数
    private boolean isRobot;                // 是否为机器人

    public boolean isEmpty()     { return playerId == 0; }
    public void    clear()       {
        playerId = 0;
        ready = false;
        trusteeship = false;
        name = null;
        headImageUrl = null;
        sex = 0;
        score = 0;
    }

    public int getSeatIndex() {
        return seatIndex;
    }


}
